﻿using ExpressesClass.KyApi.Base;
using ExpressesClass.KyApi.billCancel.response;
using ExpressesClass.KyApi.Util;
using Newtonsoft.Json;

namespace ExpressesClass.KyApi.billCancel.request
{
    public class BillCancelReq : KyRequest
    {
        public string customerCode { get; set; }
        public string waybillNumber { get; set; }
        public string xdCode { get; set; }
        public string platformFlag { get; set; }

        public override string GetMethodCode()
        {
            return ConfigUrl.GetMethodCode("CANCEL");
        }

        public override string GetTokenUrl()
        {
            return ConfigUrl.GetTokenUrl();
        }

        public override string GetUrl()
        {
            return ConfigUrl.GetUrl();
        }

        public override KyResponse makeResponse(string rsp)
        {
            return JsonConvert.DeserializeObject<BillCancelRsp>(rsp);
        }
    }
}
